<!DOCTYPE html>
<html lang='en'><meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>搭建OpenGL-freeglut开发环境 | 龙渊阁</title>







<link rel="stylesheet" href="https://dgvy.gitee.io/css/eureka.min.css">




<script defer src="https://dgvy.gitee.io/js/eureka.min.js"></script>


<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload"
    href="https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Noto+Serif+SC:wght@400;600;700&display=swap"
    as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.0/build/styles/solarized-light.min.css" as="style"
    onload="this.onload=null;this.rel='stylesheet'">
<script defer src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.1.0/build/highlight.min.js"></script>
<script async src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.14.0/js/all.min.js" integrity="sha256-uNYoXefWRqv&#43;PsIF/OflNmwtKM4lStn9yrz2gVl6ymo="
    crossorigin="anonymous"></script>




<link rel="icon" type="image/png" sizes="32x32" href="https://dgvy.gitee.io/images/icon_hu64421c6c7700f606f0ad45d807017b09_5843_32x32_fill_box_center_2.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://dgvy.gitee.io/images/icon_hu64421c6c7700f606f0ad45d807017b09_5843_180x180_fill_box_center_2.png">




<meta name="description"
    content="下载地址  http://freeglut.sourceforge.net/index.php#download  Window10环境 编译源码  使用CMkae打开./freeglut-x.x.x路径下的CMakeLists.txt 生成VS2017工程 打开工程，编译ALL_BUILD的Debug版本和Release版本  放置编译文件  编译完成后，需要使用的文件有三处  源码文件夹中./freeglut-x.x.x/include/GL/路径下的四个头文件 工程目录中./bin/目录下的freeglut.dll和freeglutd.dll 工程目录中./lib/目录下的freeglut.lib和freeglutd.lib   将其分别移动到OSG环境路径下的相应文件夹中。  工程配置  在VS工程属性连接器-&gt;输入中添加freeglutd.lib或freeglut.lib  ">





<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [{
"@type": "ListItem",
"position":  1 ,
"name": "龙渊阁",
"item": "https://dgvy.gitee.io/"
},{
"@type": "ListItem",
"position":  2 ,
"name": "Posts",
"item": "https://dgvy.gitee.io/posts/"
},{
"@type": "ListItem",
"position":  3 ,
"name": "搭建OpenGL-freeglut开发环境",
"item": "https://dgvy.gitee.io/posts/2017-11-29-%E6%90%AD%E5%BB%BAopengl-freeglut%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/"
}]
}
</script>



<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "Article",
    "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://dgvy.gitee.io/posts/2017-11-29-%E6%90%AD%E5%BB%BAopengl-freeglut%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/"
    },
    "headline": "搭建OpenGL-freeglut开发环境 | 龙渊阁","datePublished": "2017-11-29T22:24:18+00:00",
    "dateModified": "2017-11-29T22:24:18+00:00",
    "wordCount":  15 ,
    "publisher": {
        "@type": "Person",
        "name": "Example publisher",
        "logo": {
            "@type": "ImageObject",
            "url": "https://dgvy.gitee.io/images/icon.png"
        }
        },
    "description": "下载地址  http:\/\/freeglut.sourceforge.net\/index.php#download  Window10环境 编译源码  使用CMkae打开.\/freeglut-x.x.x路径下的CMakeLists.txt 生成VS2017工程 打开工程，编译ALL_BUILD的Debug版本和Release版本  放置编译文件  编译完成后，需要使用的文件有三处  源码文件夹中.\/freeglut-x.x.x\/include\/GL\/路径下的四个头文件 工程目录中.\/bin\/目录下的freeglut.dll和freeglutd.dll 工程目录中.\/lib\/目录下的freeglut.lib和freeglutd.lib   将其分别移动到OSG环境路径下的相应文件夹中。  工程配置  在VS工程属性连接器-\u0026gt;输入中添加freeglutd.lib或freeglut.lib  "
}
</script>

<meta property="og:title" content="搭建OpenGL-freeglut开发环境 | 龙渊阁" />
<meta property="og:type" content="article" />


<meta property="og:image" content="https://dgvy.gitee.io/images/icon.png">


<meta property="og:url" content="https://dgvy.gitee.io/posts/2017-11-29-%E6%90%AD%E5%BB%BAopengl-freeglut%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/" />




<meta property="og:description" content="下载地址  http://freeglut.sourceforge.net/index.php#download  Window10环境 编译源码  使用CMkae打开./freeglut-x.x.x路径下的CMakeLists.txt 生成VS2017工程 打开工程，编译ALL_BUILD的Debug版本和Release版本  放置编译文件  编译完成后，需要使用的文件有三处  源码文件夹中./freeglut-x.x.x/include/GL/路径下的四个头文件 工程目录中./bin/目录下的freeglut.dll和freeglutd.dll 工程目录中./lib/目录下的freeglut.lib和freeglutd.lib   将其分别移动到OSG环境路径下的相应文件夹中。  工程配置  在VS工程属性连接器-&gt;输入中添加freeglutd.lib或freeglut.lib  " />




<meta property="og:locale" content="en" />




<meta property="og:site_name" content="龙渊阁" />






<meta property="article:published_time" content="2017-11-29T22:24:18&#43;00:00" />


<meta property="article:modified_time" content="2017-11-29T22:24:18&#43;00:00" />



<meta property="article:section" content="posts" />


<meta property="article:tag" content="OSG" />

<meta property="article:tag" content="OpenGL" />

<meta property="article:tag" content="freeglut" />




<body class="flex flex-col min-h-screen">
    <header class="flex items-center fixed w-full min-h-16 z-50 bg-secondary-bg shadow-sm">
        <div class="container mx-auto">
            <div class="max-w-screen-xl"><script>
    let storageColorScheme = localStorage.getItem("lightDarkMode")
    if (((storageColorScheme == 'Auto' || storageColorScheme == null) && window.matchMedia("(prefers-color-scheme: dark)").matches)
        || storageColorScheme == "Dark") {
        document.getElementsByTagName('html')[0].classList.add('dark')
    } else if (storageColorScheme == "Light") {
        document.getElementsByTagName('html')[0].classList.remove('dark')
    }
</script>
<nav class="flex items-center justify-between flex-wrap p-4">
    <a href="/" class="mr-6 text-primary-text text-xl font-bold">龙渊阁</a>
    <button id="navbar-btn" class="md:hidden flex items-center px-3 py-2" aria-label="Open Navbar">
        <i class="fas fa-bars"></i>
    </button>

    <div id="target"
        class="hidden block md:flex md:flex-grow md:justify-between md:items-center w-full md:w-auto text-primary-text z-20">
        <div class="text-sm md:flex-grow pb-4 md:pb-0 border-b md:border-b-0" id="current-url"
            currenturl="https://dgvy.gitee.io/posts/2017-11-29-%E6%90%AD%E5%BB%BAopengl-freeglut%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/">
            
            <a href="/about/"
                class="block mt-4 md:inline-block md:mt-0 hover:text-eureka mr-4 main-a">About</a>
            
            <a href="/posts/"
                class="block mt-4 md:inline-block md:mt-0 hover:text-eureka mr-4 main-a">Posts</a>
            
            <a href="/docs/"
                class="block mt-4 md:inline-block md:mt-0 hover:text-eureka mr-4 main-a">Docs</a>
            
        </div>

        <div class="flex">
            <div class="relative pt-4 md:pt-0">
                <div class="cursor-pointer hover:text-eureka" id="lightDarkMode">
                    <i class="fas fa-adjust"></i>
                </div>
                <div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-30" id="is-open">
                </div>
                <div class="absolute flex flex-col left-0 md:left-auto right-auto md:right-0 hidden bg-secondary-bg w-48 rounded py-2 border border-tertiary-bg cursor-pointer z-40"
                    id='lightDarkOptions'>
                    <span class="px-4 py-1 hover:text-eureka">Light</span>
                    <span class="px-4 py-1 hover:text-eureka">Dark</span>
                    <span class="px-4 py-1 hover:text-eureka">Auto</span>
                </div>
            </div>

            
        </div>
    </div>

    <div class="fixed hidden inset-0 opacity-0 h-full w-full cursor-default z-0" id="is-open-mobile">
    </div>

</nav>
<script>
    document.addEventListener('DOMContentLoaded', () => {
        getcolorscheme();
        switchBurger();
        
    });

    let currenturl = document.getElementById('current-url').getAttribute('currenturl')
        if (currenturl.length > 1) {
            currenturl = currenturl.substr(0, currenturl.length - 1)
        }

        sessionStorage.setItem("mainKey", currenturl)

        let elements = document.getElementsByClassName('main-a');
        for (let i in elements) {
            if (typeof elements[i] === "object") {
                let elementurl = elements[i].getAttribute('href')
                if (elementurl.length > 1 && elementurl.charAt(elementurl.length - 1) == '/') {
                    elementurl = elementurl.substr(0, elementurl.length - 1)
                }
                if (elementurl == sessionStorage.getItem("mainKey")) {
                    elements[i].classList.add('text-eureka')
                } else {
                    elements[i].classList.remove('text-eureka')
                }
            }
        }
</script></div>
        </div>
    </header>

    <main class="flex-grow pt-16">
        
        <div class="container mx-auto ">
            <div class="max-w-screen-xl lg:px-4 xl:px-8">


<div class="grid grid-cols-2 lg:grid-cols-8 gap-4 lg:pt-12">
    <div
        class="col-span-2 lg:col-start-2 lg:col-span-6 bg-secondary-bg rounded px-6 py-8">
        <h1 class="font-bold text-3xl text-primary-text">搭建OpenGL-freeglut开发环境</h1>
        <div class="flex flex-wrap flex-row items-center my-2 text-tertiary-text">
    <div class="mr-6 my-2">
        <i class="fas fa-calendar mr-1"></i>
        <span>2017-11-29</span>
    </div>
    <div class="mr-6 my-2">
        <i class="fas fa-clock mr-1"></i>
        <span>1 min read</span>
    </div>
    
    
    <div class="mr-6 my-2">
        <i class="fas fa-folder mr-1"></i>
        
        <a href="https://dgvy.gitee.io/categories/%E5%9B%BE%E5%BD%A2%E5%AD%A6/" class="hover:text-eureka">图形学</a>
        
        
        <span>, </span>
        <a href="https://dgvy.gitee.io/categories/osg/" class="hover:text-eureka">OSG</a>
        
    </div>
    

    
</div>
        
        
        <div class="content">
            <h1 id="下载地址">下载地址</h1>
<ul>
<li><a href="http://freeglut.sourceforge.net/index.php#download">http://freeglut.sourceforge.net/index.php#download</a></li>
</ul>
<h1 id="window10环境">Window10环境</h1>
<h2 id="编译源码">编译源码</h2>
<ul>
<li>使用CMkae打开<code>./freeglut-x.x.x</code>路径下的<code>CMakeLists.txt</code></li>
<li>生成VS2017工程</li>
<li>打开工程，编译<code>ALL_BUILD</code>的Debug版本和Release版本</li>
</ul>
<h2 id="放置编译文件">放置编译文件</h2>
<ul>
<li>编译完成后，需要使用的文件有三处
<ol>
<li>源码文件夹中<code>./freeglut-x.x.x/include/GL/</code>路径下的四个头文件</li>
<li>工程目录中<code>./bin/</code>目录下的<code>freeglut.dll</code>和<code>freeglutd.dll</code></li>
<li>工程目录中<code>./lib/</code>目录下的<code>freeglut.lib</code>和<code>freeglutd.lib</code></li>
</ol>
</li>
<li>将其分别移动到OSG环境路径下的相应文件夹中。</li>
</ul>
<h2 id="工程配置">工程配置</h2>
<ul>
<li>在VS工程属性<code>连接器</code>-&gt;<code>输入</code>中添加<code>freeglutd.lib</code>或<code>freeglut.lib</code></li>
</ul>

        </div>
        
        <div class="my-4">
    
    <a href="https://dgvy.gitee.io/tags/osg/" class="inline-block bg-tertiary-bg text-sm rounded px-3 py-1 my-1 mr-2 hover:text-eureka">#OSG</a>
    
    <a href="https://dgvy.gitee.io/tags/opengl/" class="inline-block bg-tertiary-bg text-sm rounded px-3 py-1 my-1 mr-2 hover:text-eureka">#OpenGL</a>
    
    <a href="https://dgvy.gitee.io/tags/freeglut/" class="inline-block bg-tertiary-bg text-sm rounded px-3 py-1 my-1 mr-2 hover:text-eureka">#freeglut</a>
    
</div>
        
        
        
        
        
        
        
<div class="flex flex-col md:flex-row md:justify-between -mx-2 mt-4 px-2 pt-4 border-t">
    <div>
        
        <span class="block font-bold">Previous</span>
        <a href="https://dgvy.gitee.io/posts/2018-01-13-mysql-%E8%BF%9C%E7%A8%8B%E8%BF%9E%E6%8E%A5/" class="block">MySQL-远程连接</a>
        
    </div>
    <div class="md:text-right mt-4 md:mt-0">
        
        <span class="block font-bold">Next</span>
        <a href="https://dgvy.gitee.io/posts/2017-11-15-c&#43;&#43;%E6%95%B0%E7%BB%84/" class="block">C&#43;&#43;-数组</a>
        
    </div>
</div>

        
    </div>
    

    
    
</div>
<script>
    document.addEventListener('DOMContentLoaded', ()=>{
        hljs.initHighlightingOnLoad();
    })
</script>

            </div>
        </div>
        
    </main>

    <footer>
        <div class="container mx-auto">
            <div class="max-w-screen-xl"><footer class="w-full text-center p-6 pin-b text-sm text-tertiary-text">
    <p>&copy; 2020 <a href="https://www.wangchucheng.com/">C. Wang</a> and <a href="https://www.ruiqima.com/">R. Ma</a> &middot;  Powered by the <a href="https://github.com/wangchucheng/hugo-eureka" class="hover:text-eureka">Eureka</a> theme for <a href="https://gohugo.io" class="hover:text-eureka">Hugo</a></p>
</footer></div>
        </div>
    </footer>
</body>

</html>